<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>ColorUtil - 电网SDK-2.0</title>
    
    <meta name="description" content="基于思极地图实现的电网SDK-2.0" />
    
        <meta name="keywords" content="电网，sdk，2.0，思极地图" />
        <meta name="keyword" content="电网，sdk，2.0，思极地图" />
    
    
    
    <meta property="og:title" content="电网SDK-2.0"/>
    <meta property="og:type" content=""/>
    <meta property="og:image" content=""/>
    
    <meta property="og:url" content=""/>
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <script src="scripts/nav.js" defer></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <input type="text" id="nav-search" placeholder="Search" />
    
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Egis2D.html">Egis2D</a></li><li><a href="AnimateLayer.html">AnimateLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AnimateLayer.html#render">render</a></li><li data-type='method' style='display: none;'><a href="AnimateLayer.html#setDatas">setDatas</a></li><li data-type='method' style='display: none;'><a href="AnimateLayer.html#stop">stop</a></li><li data-type='method' style='display: none;'><a href="AnimateLayer.html#move">move</a></li><li data-type='method' style='display: none;'><a href="AnimateLayer.html#setVisible">setVisible</a></li><li data-type='method' style='display: none;'><a href="AnimateLayer.html#start">start</a></li></ul></li><li><a href="BaseLayer.html">BaseLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="BaseLayer.html#addTo">addTo</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#remove">remove</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#move">move</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#getBaseLayerId">getBaseLayerId</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#getIncludeLayers">getIncludeLayers</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#render">render</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#refresh">refresh</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#setVisible">setVisible</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#getVisible">getVisible</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#bindEvent">bindEvent</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#unbindEvent">unbindEvent</a></li><li data-type='method' style='display: none;'><a href="BaseLayer.html#destroy">destroy</a></li></ul></li><li><a href="FlowLayer.html">FlowLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="FlowLayer.html#setDatas">setDatas</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#getDatas">getDatas</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#setLineWidth">setLineWidth</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#getLineWidth">getLineWidth</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#setColors">setColors</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#getColors">getColors</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#setSegLen">setSegLen</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#setSpeed">setSpeed</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#getSpeed">getSpeed</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#start">start</a></li><li data-type='method' style='display: none;'><a href="FlowLayer.html#stop">stop</a></li></ul></li><li><a href="GridCellLayer.html">GridCellLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="GridCellLayer.html#setBounds">setBounds</a></li><li data-type='method' style='display: none;'><a href="GridCellLayer.html#setCellSize">setCellSize</a></li><li data-type='method' style='display: none;'><a href="GridCellLayer.html#move">move</a></li></ul></li><li><a href="GridFeatureLayer.html">GridFeatureLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="GridFeatureLayer.html#addEleSymbols">addEleSymbols</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayer.html#removeEleSymbols">removeEleSymbols</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayer.html#setVisible">setVisible</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayer.html#getVisible">getVisible</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayer.html#destroy">destroy</a></li></ul></li><li><a href="GridFeatureLayerExt.html">GridFeatureLayerExt</a><ul class='methods'><li data-type='method' style='display: none;'><a href="GridFeatureLayerExt.html#addEleSymbols">addEleSymbols</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayerExt.html#removeEleSymbols">removeEleSymbols</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayerExt.html#setVisible">setVisible</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayerExt.html#getVisible">getVisible</a></li><li data-type='method' style='display: none;'><a href="GridFeatureLayerExt.html#destroy">destroy</a></li></ul></li><li><a href="GridTileExtLayer.html">GridTileExtLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="GridTileExtLayer.html#setUrls">setUrls</a></li><li data-type='method' style='display: none;'><a href="GridTileExtLayer.html#getRequestParam">getRequestParam</a></li><li data-type='method' style='display: none;'><a href="GridTileExtLayer.html#setRequestParam">setRequestParam</a></li><li data-type='method' style='display: none;'><a href="GridTileExtLayer.html#setLayers">setLayers</a></li><li data-type='method' style='display: none;'><a href="GridTileExtLayer.html#setLayersFilter">setLayersFilter</a></li><li data-type='method' style='display: none;'><a href="GridTileExtLayer.html#setVisible">setVisible</a></li><li data-type='method' style='display: none;'><a href="GridTileExtLayer.html#destroy">destroy</a></li></ul></li><li><a href="GridTileLayer.html">GridTileLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="GridTileLayer.html#bindEvent">bindEvent</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#setTileUrl">setTileUrl</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#setLayers">setLayers</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#setMaxLevel">setMaxLevel</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#setMaxDevCount">setMaxDevCount</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#setCacheId">setCacheId</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#refresh">refresh</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#render">render</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#setDevCache">setDevCache</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#getDevCache">getDevCache</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#setVisible">setVisible</a></li><li data-type='method' style='display: none;'><a href="GridTileLayer.html#destroy">destroy</a></li></ul></li><li><a href="GridVectorLayer.html">GridVectorLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#bindEvent">bindEvent</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setGridOptions">setGridOptions</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setVecUrl">setVecUrl</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#getVecUrl">getVecUrl</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setDisplaySchema">setDisplaySchema</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#getDisplaySchema">getDisplaySchema</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setDevCache">setDevCache</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#getDevCache">getDevCache</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setAutoRender">setAutoRender</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#getAutoRender">getAutoRender</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#getVecRequestData">getVecRequestData</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setVecRequestData">setVecRequestData</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#refresh">refresh</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#render">render</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setLockViewDevs">setLockViewDevs</a></li><li data-type='method' style='display: none;'><a href="GridVectorLayer.html#setVisible">setVisible</a></li></ul></li><li><a href="SymbolLayer.html">SymbolLayer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SymbolLayer.html#addEleDevs">addEleDevs</a></li><li data-type='method' style='display: none;'><a href="SymbolLayer.html#removeEleDevs">removeEleDevs</a></li><li data-type='method' style='display: none;'><a href="SymbolLayer.html#move">move</a></li></ul></li><li><a href="MSManager.html">MSManager</a></li><li><a href="DevCache.html">DevCache</a><ul class='methods'><li data-type='method' style='display: none;'><a href="DevCache.html#setAddDevs">setAddDevs</a></li><li data-type='method' style='display: none;'><a href="DevCache.html#setUpdateDevs">setUpdateDevs</a></li><li data-type='method' style='display: none;'><a href="DevCache.html#setRemoveDevs">setRemoveDevs</a></li><li data-type='method' style='display: none;'><a href="DevCache.html#clearCache">clearCache</a></li><li data-type='method' style='display: none;'><a href="DevCache.html#getCache">getCache</a></li><li data-type='method' style='display: none;'><a href="DevCache.html#clone">clone</a></li></ul></li><li><a href="DisplaySchema.html">DisplaySchema</a><ul class='methods'><li data-type='method' style='display: none;'><a href="DisplaySchema.html#addSchema">addSchema</a></li><li data-type='method' style='display: none;'><a href="DisplaySchema.html#removeSchemaByLayerId">removeSchemaByLayerId</a></li><li data-type='method' style='display: none;'><a href="DisplaySchema.html#setSchema">setSchema</a></li><li data-type='method' style='display: none;'><a href="DisplaySchema.html#getSchema">getSchema</a></li><li data-type='method' style='display: none;'><a href="DisplaySchema.html#getSchemaByLayerId">getSchemaByLayerId</a></li></ul></li><li><a href="Options.html">Options</a></li><li><a href="SelectionSet.html">SelectionSet</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SelectionSet.html#setTextSourceId">setTextSourceId</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setAutoUpdate">setAutoUpdate</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setDevOidKey">setDevOidKey</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setAutoFlicker">setAutoFlicker</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setIsLinearFlicker">setIsLinearFlicker</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setLineWidth">setLineWidth</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setFillOpacity">setFillOpacity</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setDataSourceCallback">setDataSourceCallback</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setSelectionColor">setSelectionColor</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setSpeed">setSpeed</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setMinOpacity">setMinOpacity</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setMaxOpacity">setMaxOpacity</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#isFlicking">isFlicking</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setFlicker">setFlicker</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#exportImage">exportImage</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setDevs">setDevs</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#getDevs">getDevs</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#addDevs">addDevs</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#removeDevs">removeDevs</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#setMode">setMode</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#render">render</a></li><li data-type='method' style='display: none;'><a href="SelectionSet.html#clear">clear</a></li></ul></li><li><a href="EleFillSymbol.html">EleFillSymbol</a><ul class='methods'><li data-type='method' style='display: none;'><a href="EleFillSymbol.html#toJSON">toJSON</a></li><li data-type='method' style='display: none;'><a href="EleFillSymbol.html#.fromJSON">fromJSON</a></li></ul></li><li><a href="EleLineSymbol.html">EleLineSymbol</a><ul class='methods'><li data-type='method' style='display: none;'><a href="EleLineSymbol.html#toJSON">toJSON</a></li><li data-type='method' style='display: none;'><a href="EleLineSymbol.html#.fromJSON">fromJSON</a></li></ul></li><li><a href="ElePointSymbol.html">ElePointSymbol</a><ul class='methods'><li data-type='method' style='display: none;'><a href="ElePointSymbol.html#toJSON">toJSON</a></li><li data-type='method' style='display: none;'><a href="ElePointSymbol.html#.fromJSON">fromJSON</a></li></ul></li><li><a href="EleSymbol.html">EleSymbol</a><ul class='methods'><li data-type='method' style='display: none;'><a href="EleSymbol.html#mmToPixel">mmToPixel</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#pixelToMM">pixelToMM</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#getDevKey">getDevKey</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#getLayerKey">getLayerKey</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#getGeometry">getGeometry</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#setGeometry">setGeometry</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#refresh">refresh</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#getType">getType</a></li><li data-type='method' style='display: none;'><a href="EleSymbol.html#getAttribute">getAttribute</a></li></ul></li><li><a href="EleTextSymbol.html">EleTextSymbol</a><ul class='methods'><li data-type='method' style='display: none;'><a href="EleTextSymbol.html#toJSON">toJSON</a></li><li data-type='method' style='display: none;'><a href="EleTextSymbol.html#.fromJSON">fromJSON</a></li></ul></li><li><a href="HighLightTool.html">HighLightTool</a><ul class='methods'><li data-type='method' style='display: none;'><a href="HighLightTool.html#setSpeed">setSpeed</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#setColor">setColor</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#setMinOpacity">setMinOpacity</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#setMaxOpacity">setMaxOpacity</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#isFlicking">isFlicking</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#setDatas">setDatas</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#getDatas">getDatas</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#start">start</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#pause">pause</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#resume">resume</a></li><li data-type='method' style='display: none;'><a href="HighLightTool.html#stop">stop</a></li></ul></li><li><a href="LocateTool.html">LocateTool</a><ul class='methods'><li data-type='method' style='display: none;'><a href="LocateTool.html#locateByCenter">locateByCenter</a></li><li data-type='method' style='display: none;'><a href="LocateTool.html#locateByBounds">locateByBounds</a></li></ul></li><li><a href="SelectTool.html">SelectTool</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SelectTool.html#setTextSourceId">setTextSourceId</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setDrawStyle">setDrawStyle</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setSelectedColor">setSelectedColor</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setSelectTypes">setSelectTypes</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setIsAddOn">setIsAddOn</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setDrawType">setDrawType</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setIncludeAllLayers">setIncludeAllLayers</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setLayers">setLayers</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setFilterLayers">setFilterLayers</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setBorderStyle">setBorderStyle</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#setFillStyle">setFillStyle</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#disable">disable</a></li><li data-type='method' style='display: none;'><a href="SelectTool.html#destroy">destroy</a></li></ul></li><li><a href="SnapTool.html">SnapTool</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SnapTool.html#setSnapColors">setSnapColors</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#snapByLocation">snapByLocation</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#addGridCell">addGridCell</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#removeGridCell">removeGridCell</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#clearGridCell">clearGridCell</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setOptions">setOptions</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setFilterLayers">setFilterLayers</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setFillTypes">setFillTypes</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setLayers">setLayers</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setLayersExt">setLayersExt</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setTolerance">setTolerance</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setTypes">setTypes</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setPriority">setPriority</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setSnapPointVisible">setSnapPointVisible</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#setExcludeTerminalPoint">setExcludeTerminalPoint</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#enable">enable</a></li><li data-type='method' style='display: none;'><a href="SnapTool.html#disable">disable</a></li></ul></li><li><a href="ColorUtil.html">ColorUtil</a><ul class='methods'><li data-type='method' style='display: none;'><a href="ColorUtil.html#.colorTenToRGBA">colorTenToRGBA</a></li><li data-type='method' style='display: none;'><a href="ColorUtil.html#.fixColorToTen">fixColorToTen</a></li><li data-type='method' style='display: none;'><a href="ColorUtil.html#.hexToRgba">hexToRgba</a></li><li data-type='method' style='display: none;'><a href="ColorUtil.html#.fixColorToRGBA">fixColorToRGBA</a></li></ul></li><li><a href="DataUtil.html">DataUtil</a><ul class='methods'><li data-type='method' style='display: none;'><a href="DataUtil.html#.getUUID">getUUID</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.getSymbolIdBySubtypeId">getSymbolIdBySubtypeId</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.transCoordsMtoD">transCoordsMtoD</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.transCoordsDtoM">transCoordsDtoM</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.degreeToMercator">degreeToMercator</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.mercatorToDegree">mercatorToDegree</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.flatArray">flatArray</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.calcDeviceBoundary">calcDeviceBoundary</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.calcPointDevCenter">calcPointDevCenter</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.calcDeviceTerminal">calcDeviceTerminal</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.calcDistance">calcDistance</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.calcCrossPoint">calcCrossPoint</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.mmToPixel">mmToPixel</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.pixelToMM">pixelToMM</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.areaMeasure">areaMeasure</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.angleMeasure">angleMeasure</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.fixPolygon">fixPolygon</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.calcBounds">calcBounds</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.getTileBounds">getTileBounds</a></li><li data-type='method' style='display: none;'><a href="DataUtil.html#.getTileCenter">getTileCenter</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#EleSymbolEvent">EleSymbolEvent</a></li><li><a href="global.html#GridVectorLayerEvent">GridVectorLayerEvent</a></li><li><a href="global.html#SnapEvent">SnapEvent</a></li><li><a href="global.html#SelectEvent">SelectEvent</a></li><li><a href="global.html#lineTypes">lineTypes</a></li><li><a href="global.html#refData">refData</a></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">ColorUtil</h1>
    

    




<section>

<header>
    
        <h2>
        ColorUtil
        </h2>
        
            <div class="class-description usertext">颜色工具类</div>
        
    
</header>

<article>
    
        <div class="container-overview">
        
            

    
    <h2>Constructor</h2>
    

    <h4 class="name" id="ColorUtil"><span class="type-signature"></span>new ColorUtil<span class="signature">()</span><span class="type-signature"></span></h4>

    




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    提供各种颜色值的转换方法
</div>




























        
        </div>
    

    

    

    
    
    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".colorTenToRGBA"><span class="type-signature">(static) </span>colorTenToRGBA<span class="signature">(val)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    十进制转RGBA
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>val</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".fixColorToTen"><span class="type-signature">(static) </span>fixColorToTen<span class="signature">(colorVal)</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    颜色值转换为10进制颜色（仅栅格出图相关颜色有用到）
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>colorVal</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">支持rgba，rgb，#ffffff，#ffffffff，#fff，#ffff 这几种格式</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".hexToRgba"><span class="type-signature">(static) </span>hexToRgba<span class="signature">(hexColor)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    十六进制颜色转RGBA
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>hexColor</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">一个十六进制的颜色表达式，例如"#ffcc11"</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    rgbaColor - 一个rgba的颜色表达式
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".fixColorToRGBA"><span class="type-signature">(static) </span>fixColorToRGBA<span class="signature">(val)</span><span class="type-signature"> &rarr; {string|null|number|*}</span></h4>

    




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    颜色值强转为RGBA
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>val</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>
|

<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">一个颜色的值，可以使如下格式:16583325(栅格返回的十进制颜色值);"#ffffff"(#开头的颜色表达式);RGBA(255,0,255,1);RGB(255,255,0);</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    一个RGBA格式的颜色表达式
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>
|

<span class="param-type">null</span>
|

<span class="param-type">number</span>
|

<span class="param-type">*</span>


    </dd>
</dl>

    



        
    

    

    
</article>

</section>




    
    
</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu Jul 13 2023 19:29:07 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>

<script src="scripts/search.js" defer></script>


<script src="scripts/collapse.js" defer></script>


</body>
</html>